<template>
  <div class="home">
    <img alt="Vue logo" src="../assets/logo.png">
    <HelloWorld msg="Welcome to Your Vue.js App"/>
  </div>
</template>

<script>
// @ is an alias to /src
import HelloWorld from '@/components/HelloWorld.vue'
import axios from 'axios'

export default {
  name: 'HomeView',
  components: {
    HelloWorld
  },
  created() {
    /*this.fetchTutorials();*///组件创建时获取数据
    axios.get("ebook/list").then(res=>{
      console.log(res)
    })
  },
/*  methods:{
    fetchTutorials() {
      axios
          .get('ebook/list')
          .then(response => {
            if (response.data.success) {
              this.content = response.data.content;
            } else {
              console.error('Failed to fetch tutorials: ',response.data.message);
            }
      })
          .catch(error => {
            console.error('API request failed ',error);
          });

    },
  },*/
};
</script>
